import Vue from 'vue'
import App from './App'
import sUi from '@/uni_modules/s-ui';

Vue.use(sUi, {
  // 是否给页面page全局混入一个onEmitPage钩子，使用this.$emitPage(pagePath,...args)触发
  useEmitPageMixin: true,
  // 是否替换uni默认的showLoading,hideLoading
  replaceUniLoading: false,
  // 是否替换uni默认的showToast,hideToast
  replaceUniToast: false,
  // 是否替换uni默认的showModal
  replaceUniModal: false,
  // tabbar 组件点击返回时，没有后退记录时默认reLaunch到的页面
  homePath: '/pages/index/index',
});
//全局引入myRequest，用于远程交互
import {myRequest} from './util/my_request.js'
import {request} from './util/request.js'
import {ssgwRequest} from './util/ssgw_request.js'

// import Vue from 'vue';


// 替换uni默认的showLoading，showToast，showModal需在页面上引入<s-toast/> <s-dialog/>
// 推荐直接使用<s-page custom-class="Index-Page">内容</s-page>
Vue.prototype.$request = request
Vue.prototype.$myRequest = myRequest
Vue.prototype.$ssgwRequest = ssgwRequest

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
